package remotecontrolcase.command.stereo;

import remotecontrolcase.command.Command;
import remotecontrolcase.component.Stereo;

/**
 * description:
 *  关闭音响命令对象
 * @author yuanmenglv on 2019/11/30
 */
public class StereoOffCommand implements Command {
    private Stereo stereo;

    public StereoOffCommand(Stereo stereo) {
        this.stereo = stereo;
    }

    @Override
    public void execute() {
        stereo.off();
    }

    @Override
    public void undo() {
        System.out.println("撤销中");
        stereo.on();
    }
}
